<template>
  <div>
    <p>我是孙子组件{{ foo }}</p>
    <el-button @click="startUpRocket('我要改变爷爷的值')">我要传值</el-button>
  </div>
</template>

<script>
export default {
  props: {
    foo: {
      type: String,
      default: false
    }
  },
  inheritAttrs: false,
  data () {
    return {}
  },
  methods: {
    startUpRocket (val) {
      let data = {
        changeName: val
      }
      this.$emit('upRocket', data)
    }
  }
}
</script>